﻿<UserControl x:Class="ClientCenter.InstallRepair"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="520" d:DesignWidth="350">
    <Grid>
        <ScrollViewer CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <DockPanel>
                <DockPanel DockPanel.Dock="Top">
                    <GroupBox Header="SCCM Agent" HorizontalAlignment="Stretch" Name="gbSCCMAgent" VerticalAlignment="Top" >
                        <Grid>
                            <StackPanel Margin="0,5,0,0">
                                <Button Content="Cleanup Message Queue" Height="23" HorizontalAlignment="Center" Name="bt_CleanupMessageQueue" VerticalAlignment="Top" Width="175" Margin="0,5,0,0" Click="bt_CleanupMessageQueue_Click" ToolTip="Cleanup Agent Message Queue and restart the Agent Service." />
                                <Button Content="Delete Agent Certificate" Height="23" HorizontalAlignment="Center" Name="bt_DeleteAgentCertificates" VerticalAlignment="Top" Width="175" Margin="0,5,0,0" Click="bt_DeleteAgentCertificates_Click"  />
                                <Button Content="Repair Agent" Height="23" HorizontalAlignment="Center" Name="bt_RepairAgent" VerticalAlignment="Top" Width="175" Margin="0,5,0,0" IsEnabled="True" Click="bt_RepairAgent_Click" />
                                <Button Content="Remove Agent" Height="23" HorizontalAlignment="Center" Name="bt_RemoveAgent" VerticalAlignment="Top" Width="175" Margin="0,5,0,0" IsEnabled="True" Click="bt_RemoveAgent_Click" />
                                <Button Content="Install Agent..." Height="23" HorizontalAlignment="Center" Name="bt_installAgent" VerticalAlignment="Top" Width="175" Margin="0,5,0,0" IsEnabled="True" Click="bt_installAgent_Click"  />

                            </StackPanel>
                        </Grid>
                    </GroupBox>
                </DockPanel>
                <DockPanel DockPanel.Dock="Top">
                    <GroupBox Header="Windows Management Instrumentation (WMI)" HorizontalAlignment="Stretch" Name="gbWMI" VerticalAlignment="Top" >
                        <Grid>
                            <StackPanel Margin="0,5,0,0">
                                <Button Content="Verify WMI Repository" Height="23" HorizontalAlignment="Center" Name="bt_WMICheck" VerticalAlignment="Top" Width="175" ToolTip="winmgmt /verifyrepository" Click="bt_WMICheck_Click" />
                                <Button Content="Performs a consistency check " Height="23" HorizontalAlignment="Center" Name="bt_WMISalvage" VerticalAlignment="Top" Width="175" ToolTip="winmgmt /salvagerepository" Margin="0,5,0,0" Click="bt_WMISalvage_Click" />
                                <Button Content="Delete root\ccm " Height="23" HorizontalAlignment="Center" Name="bt_DelCCM" VerticalAlignment="Top" Width="175" ToolTip="delete the root\ccm namespace in WMI" Margin="0,5,0,0" Click="bt_DelCCM_Click" />
                                <Button Content="Reset WMI Repository " Height="23" HorizontalAlignment="Center" Name="bt_WMIReset" VerticalAlignment="Top" Width="175" ToolTip="winmgmt /resetrepository" Margin="0,5,0,0" Click="bt_WMIReset_Click" />
                            </StackPanel>
                        </Grid>
                    </GroupBox>
                </DockPanel>
                <DockPanel DockPanel.Dock="Top">
                    <GroupBox Header="Register DLL's" HorizontalAlignment="Stretch" Name="gbDLL" VerticalAlignment="Top" >
                        <Grid>
                            <StackPanel Margin="0,5,0,0">
                                <Button Content="Register common DLL's" Height="23" HorizontalAlignment="Center" Name="bt_RegDLL" VerticalAlignment="Top" Width="175" ToolTip="register dll by using regsvr32." Click="bt_RegDLL_Click" />
                            </StackPanel>
                        </Grid>
                    </GroupBox>
                </DockPanel>
                <DockPanel DockPanel.Dock="Top">
                    <GroupBox Header="DCOM Permission" HorizontalAlignment="Stretch" Name="gbDCOMPerm" VerticalAlignment="Top" >
                        <Grid HorizontalAlignment="Center" ShowGridLines="False">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="29" />
                                <RowDefinition Height="29" />
                                <RowDefinition Height="29" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="50" />
                                <ColumnDefinition Width="60" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="DefaultLaunchPermission:" Grid.Column="0" />
                            <Button Content="Get" Grid.Column="1" Height="23" HorizontalAlignment="Center" Name="bt_DCOMGetDefaultLaunchPermission" VerticalAlignment="Top"  ToolTip="Get the ACL string" Click="bt_DCOMGetDefaultLaunchPermission_Click" />
                            <Button Content="to Default" Grid.Column="2" Height="23" HorizontalAlignment="Center" Name="bt_DCOMSetDefaultLaunchPermission" VerticalAlignment="Top"  ToolTip="Default=O:BAG:BAD:(A;;CCDCLCSWRP;;;SY)(A;;CCDCLCSWRP;;;BA)(A;;CCDCLCSWRP;;;IU)" Click="bt_DCOMSetDefaultLaunchPermission_Click" />
                            <TextBlock Text="MachineAccessRestriction:" Grid.Column="0" Grid.Row="1" />
                            <Button Content="Get" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Center" Name="bt_DCOMGetMachineAccessRestriction" VerticalAlignment="Top"  ToolTip="Get the ACL string" Click="bt_DCOMGetMachineAccessRestriction_Click" />
                            <Button Content="to Default" Grid.Column="2" Grid.Row="1" Height="23" HorizontalAlignment="Center" Name="bt_DCOMSetMachineAccessRestriction" VerticalAlignment="Top" Click="bt_DCOMSetMachineAccessRestriction_Click" ToolTip="Default=O:BAG:BAD:(A;;CCDCLC;;;WD)(A;;CCDCLC;;;LU)(A;;CCDCLC;;;S-1-5-32-562)(A;;CCDCLC;;;AN)" />
                            <TextBlock Text="MachineLaunchRestriction:" Grid.Column="0" Grid.Row="2" />
                            <Button Content="Get" Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Center" Name="bt_DCOMGetMachineLaunchRestriction" VerticalAlignment="Top"  ToolTip="Get the ACL string" Click="bt_DCOMGetMachineLaunchRestriction_Click" />
                            <Button Content="to Default" Grid.Column="2" Grid.Row="2" Height="23" HorizontalAlignment="Center" Name="bt_DCOMSetMachineLaunchRestriction" VerticalAlignment="Top" ToolTip="Default=O:BAG:BAD:(A;;CCDCSW;;;WD)(A;;CCDCLCSWRP;;;BA)(A;;CCDCLCSWRP;;;LU)(A;;CCDCLCSWRP;;;S-1-5-32-562))" Click="bt_DCOMSetMachineLaunchRestriction_Click" />

                        </Grid>
                    </GroupBox>
                </DockPanel>
                <DockPanel DockPanel.Dock="Top">
                    <GroupBox Header="Shutdown / Restart" HorizontalAlignment="Stretch" Name="gbRestart" VerticalAlignment="Top" >
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
                            <Button Name="btLogoff" Content="Logoff" Height="23" Width="100" HorizontalAlignment="Center" Margin="0,5,10,0" Click="btLogoff_Click" ToolTip="Logoff all Users"/>
                            <Button Name="btRestart" Content="Restart" Height="23" Width="100" HorizontalAlignment="Center" Margin="0,5,10,0" Click="btRestart_Click" ToolTip="Enforce a restart (no Warning !)"/>
                            <Button Name="btShutdown" Content="Shutdown" Height="23" Width="100" HorizontalAlignment="Center" Margin="0,5,10,0" Click="btShutdown_Click" ToolTip="Shutdown the computer (no Warning !)"/>
                        </StackPanel>
                    </GroupBox>
                </DockPanel>
            </DockPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
